package com.cn.wanxi.common;

import java.util.Arrays;

/**
 * @description:
 * @author: mayafei
 */
public class StringUtil {
    /**
     * 字符串分割转化成int数组
     * @param allID 字符串
     * @param symbol 符号
     * @return
     */
    public static int[] stringToArray(String allID,String symbol){
//       分割字符串
        String[] split = allID.split(symbol);
        //数组长度
        int length = split.length;
        int[] id = new int[length];
        for (int i = 0; i < length; i++) {
            id[i] = Integer.parseInt(split[i]);
        }
        return id;
    }
}
